﻿ @{
     String _BodyContainerBorderCSS = String.Empty;
    int _BodyContainerGridSize = 16;
    if(IsSectionDefined(AppConstants.Sections.LEFT_SIDEBAR)){
        _BodyContainerGridSize = _BodyContainerGridSize - 3;
        _BodyContainerBorderCSS += " border-left";
    }   
    if(IsSectionDefined(AppConstants.Sections.RIGHT_SIDEBAR)){
        _BodyContainerGridSize = _BodyContainerGridSize - 3;
        _BodyContainerBorderCSS += " border-right";
    }
 } 
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/960.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/DesignerStyles.css")" rel="stylesheet" type="text/css" />
    @*<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />*@  
    <link href="@Url.Content("~/Content/themes/bdmarket-jtheme/jquery.ui.all.css")" rel="Stylesheet" type="text/css" />    
    @*@Html.JavaScript("jquery-1.5.1.min.js", Url)*@
    @Html.JavaScript("jquery-1.7.2.min.js", Url)    
    @RenderSection(AppConstants.Sections.PAGE_HEAD, required: false)
    <link rel="stylesheet" href="/Content/lightbox.css" type="text/css" media="screen" />
    @*<link rel="stylesheet" href="/Content/screen.css" type="text/css" media="screen" />*@    
</head>
<body>   
    <div id="wrapper">
        <div id="header" class="container_16 clearfix">            
            @Html.Partial("_Header") 
        </div>
        
        <div class="banner-content">
            <div class="content container_16 clearfix">
                @if (IsSectionDefined(AppConstants.Sections.LEFT_SIDEBAR))
                {
                <div class="grid_3">
                    @RenderSection(AppConstants.Sections.LEFT_SIDEBAR, required: false)                                   
                </div>  
                }
                <div class="grid_@(_BodyContainerGridSize)">
                    <div class="page-body@(_BodyContainerBorderCSS)" style="min-height:350px;">
                        @RenderBody()
                    </div>
                </div>
                @if (IsSectionDefined(AppConstants.Sections.RIGHT_SIDEBAR))
                {
                <div class="grid_3">
                    @RenderSection(AppConstants.Sections.RIGHT_SIDEBAR, required: false)                    
                </div>
                }
                <div class="clear"></div>
            </div>
        </div>
        @Html.Partial("_Footer")
    </div>
    @Html.JavaScript("jquery-ui-1.8.11.min.js", Url)
    @Html.JavaScript("Common.js", Url)
    @*Loading Animation Controls*@
    <div id="divLoadingAnimation"><img src="@Url.Content("~/")Content/images/loading.gif" alt="Loading" title="Loading" /></div>
    <div id="divBlockingContainer"></div>
 </body>  
 </html>
